<?php

namespace Game\Controller;

use Think\Controller;

class GameController extends Controller
{
    private $gameConfigLogic;

    public function _initialize()
    {
        $this->gameConfigLogic = A('Game/GameConfig', 'Logic');
    }

    public function index(){
        $page =1;
        $pageSize = 20;
        $data['type']=1;
        $listRes = $this->gameConfigLogic->getList($page, $pageSize, $data);
        $data = $listRes['Result'];
        $total = $data['total'];
        $list = $data['list'];
        
        $data['type']=2;
        $listRes = $this->gameConfigLogic->getList($page, $pageSize, $data);
        $data = $listRes['Result'];
        $list1=$data['list'];

        $data['type']=4;
        $listRes = $this->gameConfigLogic->getList($page, $pageSize, $data);
        $data = $listRes['Result'];
        $list2=$data['list'];

        $data['type']=3;
        $listRes = $this->gameConfigLogic->getList($page, $pageSize, $data);
        $data = $listRes['Result'];
        $list4=$data['list'];
        $this->assign("list", $list);
        $this->assign("list1", $list1);
        $this->assign("list2", $list2);
        $this->assign("list4", $list4);
        $this->display();
    }
}